package com.vodafone.nocs.inops.tools.fix;

public class UTIL {
	
	final public static Integer COUNTERS = 0;
	final public static Integer BUNDLES = 1;

	final public static Integer SKIP = 1;
	final public static Integer WARNING = 2;
	final public static Integer DELETE = 4;
	final public static Integer PROVISION = 8;
	final public static Integer FAULTNOFIX = 16;

	final public static Integer CTOK = 1;
	final public static Integer BUCKETSTARTDATEMISSING = 2;
	final public static Integer BUCKETENDDATEMISSING = 4;
	final public static Integer NOBUCKET = 8;
	final public static Integer NOCOUNTER = 16;
	final public static Integer BUNDLEENDDATEMISSING = 32;
	final public static Integer BUCKETISEXHAUSTED = 64;
	final public static Integer UNKNOWNISSUE = 128;
	
	final public static Integer READFROMDUMP = 0;
	final public static Integer READFROMLDAP = 1;

	
	public static int outputLevel = 0;
	public static int execLevel = 1;

	public static boolean statsOnly = false;
	
	public static int debuglogLevel = 0;
	public static int omlogLevel = 0;


	public static void OUTLOG(Object string) {
		if (outputLevel == 0 ) {
			return;
		} else if (outputLevel == 1 && !statsOnly) {
			System.out.println(string.toString());
		}
	}
	
	public static void EXECLOG(Object string) {
		if (execLevel == 0 ) {
			return;
		} else if (execLevel == 1 && !statsOnly) {
			System.out.println(string.toString());
		}
	}

	
	public static String printFix(int fix) {
		if (fix == SKIP)
			return "SKIP";
		else if (fix == WARNING)
			return "WARNING";
		else if (fix == DELETE)
			return "DELETE";
		else if (fix == PROVISION)
			return "PROVISION";
		return null;
	}
	
	public static void DEBLOG(Object string) {
		if (debuglogLevel == 0) {
			return;
		} else if (debuglogLevel == 1) {
			System.out.println(string.toString());
		}
	}

	public static void LINE(int i) {
		if (debuglogLevel == 0) {
			return;
		} else if (debuglogLevel == 1) {
			System.out.println("LINE " + i);

		}
	}

	public static void OMLOG(Object string) {
		if (omlogLevel == 0) {
			return;
		} else if (omlogLevel == 1) {
			System.out.println(string.toString());
		}
	}
	
	public static void STATLOG(Object string) {
		if (!UTIL.statsOnly) {
			return;
		} else {
			System.out.println(string.toString());
		}
	}


	public static void OMLOGd(Object string) {
		if (omlogLevel == 0) {
			return;
		} else if (omlogLevel == 1 ) {
			System.out.print(string.toString());
		}
	}

}
